Crate cirru_parser

source ·
Expand description

§Cirru Parser

This tiny parser parses indentation based syntax into nested a vector, then it could used as S-Expressions for evaluation or codegen.

defn fib (x)
  if (<= x 2) 1
    +
      fib $ dec x
      fib $ - x 2

parses to:

[ ["defn" "fib" [ "x" ]
    [ "if" [ "<=" "x" "2" ] "1"
      [ "+" [ "fib" ["dec" "x"] ] [ "fib" ["-" "x" "2"] ] ]
    ]
] ]

find more on http://text.cirru.org/ .

Structs§

Enums§

  • Cirru uses nested Vecters and Strings as data structure
  • internal control item during lexing

Functions§

Type Aliases§